package org.robot.scm.platform.schedule;

import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.robot.scm.infra.LocalCacheHelper;
import org.robot.scm.platform.AbstractSchedule;
import org.robot.scm.utils.DateTool;

/**
 * 期货合约数据补偿任务
 *
 * @Author : Awn create on 2025/5/19 15:26
 */
@Slf4j
public class FuturesContractsBackupJob extends AbstractSchedule {

    @Override
    public void handle() {
        String futureJobFailDate = LocalCacheHelper.get(FuturesContractsJob.class.getName());
        if (StringUtils.equals(futureJobFailDate, DateTool.currentDate())) {
            new FuturesContractsJob().handle();
        }
    }


    @Override
    public String getName() {
        return "futuresContractsBackupJob";
    }
}
